Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #363 - Multiple Configuration Profiles. #399

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

radcortez
Copy link
Member

No description provided.

@radcortez radcortez added this to the 1.9.1 milestone Sep 22, 2020
@radcortez radcortez linked an issue Sep 22, 2020 that may be closed by this pull request
@radcortez
Copy link
Member Author

@famod If you want to have a look :)

@famod
Copy link

famod commented Sep 22, 2020

Thanks! Will take me some time but I'll check it out.
Can I just pull some snapshot into Quarkus?

@radcortez
Copy link
Member Author

Can I just pull some snapshot into Quarkus?

My recommendation is to checkout this PR, build SR Config and then update the SR Config dependency in Quarkus.

@@ -27,10 +30,11 @@
}
};

private final String profile;
private final String[] profiles;
Copy link
Contributor

@Emily-Jiang Emily-Jiang Sep 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to be in a list. In this way, if someone specifies conflicting config profiles such as test, prod. With the list, you can specify the order say the first one takes precedence. If they define the same properties e.g.
%test.name=Bob
%prod.name=Nick
At least, you can ensure the %test.name takes precedence over %prod.name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the array as well. In fact, priority is set with the first profile in the list and profile values are read in order. If one is found, that is the one returned.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are all ordered for sure. I just thought List is obvious. I think it is best to document which value is to be used.

@famod
Copy link

famod commented Sep 27, 2020

FWIW, the following test fails on Windows:

[INFO] Running io.smallrye.config.ConfigValuePropertiesConfigSourceTest
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.005 s <<< FAILURE! - in io.smallrye.config.ConfigValuePropertiesConfigSourceTest
[ERROR] interceptor  Time elapsed: 0.005 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <20> but was: <39>
        at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
        at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
        at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
        at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
        at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1124)
        at io.smallrye.config.ConfigValuePropertiesConfigSourceTest.interceptor(ConfigValuePropertiesConfigSourceTest.java:20)

@famod
Copy link

famod commented Sep 27, 2020

Hm, strange. Seems like a regression?

[...]/quarkus-quickstarts/getting-started (master)
$ mvn clean verify
[...]
ERROR: Failed to start application (with profile test)
io.quarkus.runtime.configuration.ConfigurationException: One or more configuration errors has prevented the application from starting. The errors are:
Configuration key "quarkus.banner.enabled" is required, but its value is empty/missing: SRCFG00014: Property quarkus.banner.enabled not found

[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 3.59 s <<< FAILURE! - in org.acme.getting.started.GreetingResourceTest
[ERROR] org.acme.getting.started.GreetingResourceTest.testHelloEndpoint  Time elapsed: 0.007 s  <<< ERROR!
java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
Caused by: java.lang.RuntimeException: Failed to start quarkus
Caused by: io.quarkus.runtime.configuration.ConfigurationException:
One or more configuration errors has prevented the application from starting. The errors are:
Configuration key "quarkus.banner.enabled" is required, but its value is empty/missing: SRCFG00014: Property quarkus.banner.enabled not found

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   GreetingResourceTest.testHelloEndpoint » Runtime java.lang.RuntimeException: F...
[...]

application.properties:

%foo.quarkus.banner.enabled=false

PS: Version of Quarkus changed from 1.8.1.Final to 999-SNAPSHOT (depends on sr-config 1.9.1-SNAPSHOT).

Same happens when running: java -jar target/getting-started-1.0-SNAPSHOT-runner.jar

In Quarkus dev mode this seems to be working, though!
But is it expected that the override order is FIFO? Meaning the first profile defining a property "wins" and subsequent profiles cannot override that property?

@radcortez
Copy link
Member Author

FWIW, the following test fails on Windows:

Strange. I'll have a look.

But is it expected that the override order is FIFO? Meaning the first profile defining a property "wins" and subsequent profiles cannot override that property?

This is how I've implemented it, but we can turn it around.

@famod
Copy link

famod commented Sep 28, 2020

In case the latest push was supposed to fix the regression in the Quarkus quickstart: it does not fix it.

@radcortez
Copy link
Member Author

In case the latest push was supposed to fix the regression in the Quarkus quickstart: it does not fix it.

No, it was just to update with latest master. This last push should fix the issue. Actually the issue has been there since we implemented line number info in properties file. It was not working on Windows.

@radcortez
Copy link
Member Author

Also, I tried out with the getting started project and it seems to work as expected. Can you confirm?

@famod
Copy link

famod commented Sep 29, 2020

mvn clean verify -f getting-started with this branch
quarkusio/quarkus-quickstarts@master...famod:multiple-profiles
still fails, runner jar as well.

This is with Quarkus master @ quarkusio/quarkus@ac0e934 with sr-config 1.9.1-SNAPSHOT (this PR's branch).

Diff in Quarkus:

diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index 718130f58c..ccbd66a560 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -34,7 +34,7 @@
         <microprofile-reactive-streams-operators.version>1.0.1</microprofile-reactive-streams-operators.version>
         <microprofile-rest-client.version>1.4.1</microprofile-rest-client.version>
         <smallrye-common.version>1.4.0</smallrye-common.version>
-        <smallrye-config.version>1.9.0</smallrye-config.version>
+        <smallrye-config.version>1.9.1-SNAPSHOT</smallrye-config.version>
         <smallrye-health.version>2.2.3</smallrye-health.version>
         <smallrye-metrics.version>2.4.3</smallrye-metrics.version>
         <smallrye-open-api.version>2.0.9</smallrye-open-api.version>

@radcortez
Copy link
Member Author

Ok, let me have another look.

@radcortez
Copy link
Member Author

Ok, I've tried this setup:

mvn install this branch https://github.com/radcortez/smallrye-config/tree/multiple-profiles

Update Quarkus BOM. I'm using https://github.com/quarkusio/quarkus/commits/47d4aa59e3770a94f56ed8f8d2189b5869b104e3

diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index a6d70ee780..5b41f83564 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -34,7 +34,7 @@
         <microprofile-reactive-streams-operators.version>1.0.1</microprofile-reactive-streams-operators.version>
         <microprofile-rest-client.version>1.4.1</microprofile-rest-client.version>
         <smallrye-common.version>1.4.0</smallrye-common.version>
-        <smallrye-config.version>1.9.0</smallrye-config.version>
+        <smallrye-config.version>1.9.1-SNAPSHOT</smallrye-config.version>
         <smallrye-health.version>2.2.3</smallrye-health.version>
         <smallrye-metrics.version>2.4.3</smallrye-metrics.version>
         <smallrye-open-api.version>2.0.9</smallrye-open-api.version>


Install Quarkus BOM mvn install -pl bom/application

Update Quickstart project:

diff --git a/getting-started/pom.xml b/getting-started/pom.xml
index 293e4b65..d24c6504 100644
--- a/getting-started/pom.xml
+++ b/getting-started/pom.xml
@@ -10,7 +10,7 @@
         <quarkus-plugin.version>1.8.1.Final</quarkus-plugin.version>
         <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
         <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
-        <quarkus.platform.version>1.8.1.Final</quarkus.platform.version>
+        <quarkus.platform.version>999-SNAPSHOT</quarkus.platform.version>
         <compiler-plugin.version>3.8.1</compiler-plugin.version>
         <surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/getting-started/src/main/resources/application.properties b/getting-started/src/main/resources/application.properties
index dc78bc19..37422ed4 100644
--- a/getting-started/src/main/resources/application.properties
+++ b/getting-started/src/main/resources/application.properties
@@ -1,2 +1,4 @@
 # Quarkus Configuration file
 # key = value
+quarkus.banner.enabled=true
+%foo.quarkus.banner.enabled=false
+%bar.quarkus.banner.enabled=true


Build project mvn clean package

Results

mvn quarkus:dev

mvn quarkus:dev
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:1.8.1.Final:dev (default-cli) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /Users/radcortez/Code/open-source/quarkus-quickstarts/getting-started/target/classes
Listening for transport dt_socket at address: 5005
__  ____  __  _____   ___  __ ____  ______
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
            Powered by Quarkus 999-SNAPSHOT
2020-10-01 13:36:37,563 INFO  [io.quarkus] (Quarkus Main Thread) getting-started 1.0-SNAPSHOT on JVM (powered by Quarkus 999-SNAPSHOT) started in 0.903s. Listening on: http://0.0.0.0:8080
2020-10-01 13:36:37,566 INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2020-10-01 13:36:37,566 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, resteasy]

mvn quarkus:dev -Dquarkus.profile=foo

mvn quarkus:dev -Dquarkus.profile=foo
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:1.8.1.Final:dev (default-cli) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
2020-10-01 13:37:40,964 INFO  [io.quarkus] (Quarkus Main Thread) getting-started 1.0-SNAPSHOT on JVM (powered by Quarkus 999-SNAPSHOT) started in 0.855s. Listening on: http://0.0.0.0:8080
2020-10-01 13:37:40,980 INFO  [io.quarkus] (Quarkus Main Thread) Profile foo activated. Live Coding activated.
2020-10-01 13:37:40,980 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, resteasy]

mvn quarkus:dev -Dquarkus.profile=bar,foo

mvn quarkus:dev -Dquarkus.profile=bar,foo
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:1.8.1.Final:dev (default-cli) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
__  ____  __  _____   ___  __ ____  ______
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
            Powered by Quarkus 999-SNAPSHOT
2020-10-01 13:39:06,766 INFO  [io.quarkus] (Quarkus Main Thread) getting-started 1.0-SNAPSHOT on JVM (powered by Quarkus 999-SNAPSHOT) started in 0.831s. Listening on: http://0.0.0.0:8080
2020-10-01 13:39:06,785 INFO  [io.quarkus] (Quarkus Main Thread) Profile bar,foo activated. Live Coding activated.
2020-10-01 13:39:06,785 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, resteasy]

mvn quarkus:dev -Dquarkus.profile=foo,bar

mvn quarkus:dev -Dquarkus.profile=foo,bar
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:1.8.1.Final:dev (default-cli) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
2020-10-01 13:40:00,921 INFO  [io.quarkus] (Quarkus Main Thread) getting-started 1.0-SNAPSHOT on JVM (powered by Quarkus 999-SNAPSHOT) started in 0.848s. Listening on: http://0.0.0.0:8080
2020-10-01 13:40:00,940 INFO  [io.quarkus] (Quarkus Main Thread) Profile foo,bar activated. Live Coding activated.
2020-10-01 13:40:00,940 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, resteasy]

java -jar -Dquarkus.profile=bar,foo target/getting-started-1.0-SNAPSHOT-runner.jar

java -jar -Dquarkus.profile=bar,foo target/getting-started-1.0-SNAPSHOT-runner.jar
__  ____  __  _____   ___  __ ____  ______
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2020-10-01 13:40:47,320 INFO  [io.quarkus] (main) getting-started 1.0-SNAPSHOT on JVM (powered by Quarkus 999-SNAPSHOT) started in 0.584s. Listening on: http://0.0.0.0:8080
2020-10-01 13:40:47,340 INFO  [io.quarkus] (main) Profile bar,foo activated.
2020-10-01 13:40:47,341 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy]

java -jar -Dquarkus.profile=foo,bar target/getting-started-1.0-SNAPSHOT-runner.jar

java -jar -Dquarkus.profile=foo,bar target/getting-started-1.0-SNAPSHOT-runner.jar
2020-10-01 13:41:22,277 INFO  [io.quarkus] (main) getting-started 1.0-SNAPSHOT on JVM (powered by Quarkus 999-SNAPSHOT) started in 0.672s. Listening on: http://0.0.0.0:8080
2020-10-01 13:41:22,302 INFO  [io.quarkus] (main) Profile foo,bar activated.
2020-10-01 13:41:22,302 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy]

@radcortez
Copy link
Member Author

And this sample showcases multiple values profiles as well:

radcortez/quarkus-playground@7d769ba

java -jar -Dquarkus.profile=prod,common,new target/number-api-runner.jar

curl http://localhost:8081/numbers/generate
MV-ABC2200277113

java -jar -Dquarkus.profile=prod,common target/number-api-runner.jar
curl http://localhost:8081/numbers/generate
BK-ABC9768326113

@radcortez
Copy link
Member Author

I might be missing some scenario. Please let me know it this is working for you or if I'm missing anything. Thanks!

@famod
Copy link

famod commented Oct 1, 2020

Thanks for all these details! I'll re-check in the next few days.
One difference I can see right away is that I built entire Quarkus, not just the BOM.

@radcortez
Copy link
Member Author

One difference I can see right away is that I built entire Quarkus, not just the BOM.

You should do it anyway, because we may have different states in our repo, so to be on the safe side might as well do it.

@famod
Copy link

famod commented Oct 2, 2020

Hm, mvn clean package still fails for me, even if I go back to the Quarkus commit you mentioned.
I even re-cloned sr-config.

Have you tried my Quarkus-Quickstart branch quarkusio/quarkus-quickstarts@master...famod:multiple-profiles ?

Could this be related to Windows?

@radcortez
Copy link
Member Author

Hm, mvn clean package still fails for me, even if I go back to the Quarkus commit you mentioned.
I even re-cloned sr-config.

The feature, right? But not the build.

Have you tried my Quarkus-Quickstart branch quarkusio/[email protected]:multiple-profiles ?

I've used my own. I'll try yours now.

Could this be related to Windows?

I don't see a reason for it. There was indeed a Windows issue, related with another feature that I've fixed here: 13efd6d. But it doesn't impact this one.

@radcortez
Copy link
Member Author

@famod I've tried with your branch, and it seems fine to me as well:

mvn quarkus:dev -Dquarkus.profile=foo,bar
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:999-SNAPSHOT:dev (default-cli) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
2020-10-02 14:29:36,781 INFO  [io.quarkus] (Quarkus Main Thread) getting-started 1.0-SNAPSHOT on JVM (powered by Quarkus 999-SNAPSHOT) started in 0.928s. Listening on: http://0.0.0.0:12345
2020-10-02 14:29:36,803 INFO  [io.quarkus] (Quarkus Main Thread) Profile foo,bar activated. Live Coding activated.
2020-10-02 14:29:36,803 INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, resteasy]

How are you passing the profile to activate? With -Dquarkus.profile=foo,bar? Can you paste your Quarkus log to see which one is active?

@famod
Copy link

famod commented Oct 2, 2020

It already fails without activating any special profile.

@radcortez radcortez modified the milestones: 1.9.1, 1.9.2 Oct 2, 2020
@radcortez
Copy link
Member Author

But did you try running that command to activate the profiles?

The failure you are having is this one?

One or more configuration errors has prevented the application from starting. The errors are:
Configuration key "quarkus.banner.enabled" is required, but its value is empty/missing: SRCFG00014: Property quarkus.banner.enabled not found

@famod
Copy link

famod commented Oct 2, 2020

I am getting:

One or more configuration errors has prevented the application from starting. The errors are:
Configuration key "quarkus.http.port" is required, but its value is empty/missing: SRCFG00014: Property quarkus.http.port not found
Configuration key "quarkus.banner.enabled" is required, but its value is empty/missing: SRCFG00014: Property quarkus.banner.enabled not found

Btw, after your recent push Quarkus build fails with:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1-jboss-1:compile (default-compile) on project quarkus-arc-deployment: Compilation failure
[ERROR] /C:/_dev/git/quarkus/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ConfigBuildStep.java:[53,26] cannot find symbol
[ERROR]   symbol:   class ConfigMappingObjectLoader
[ERROR]   location: package io.smallrye.config

So unfortunately I cannot properly test the quickstart anymore...

@famod
Copy link

famod commented Oct 6, 2020

@radcortez you pushed an update, so does it make sense to try another test run?

@radcortez
Copy link
Member Author

Yes. The PR already has the updates to SR Config 1.9.1. which requires my Quarkus 1.9.1 Config support here: https://github.com/radcortez/quarkus/tree/config-1.9.1

@famod
Copy link

famod commented Oct 6, 2020

Ok. 1.9.1 has also been merged into Quarkus already: quarkusio/quarkus#12501

@famod
Copy link

famod commented Oct 6, 2020

runner.jar now works as expected but I still get these strange test failures:

%foo.quarkus.banner.enabled=false
%bar.quarkus.banner.enabled=true
%bar.quarkus.http.port=12345
[INFO] Running org.acme.getting.started.GreetingResourceTest
Okt. 06, 2020 10:46:52 NACHM. org.jboss.threads
INFO: JBoss Threads version %s
Okt. 06, 2020 10:46:53 NACHM. io.quarkus.config
ERROR: Configuration key "quarkus.http.port" is required, but its value is empty/missing: SRCFG00014: Property quarkus.http.port not found
Okt. 06, 2020 10:46:53 NACHM. io.quarkus.config
ERROR: Configuration key "quarkus.banner.enabled" is required, but its value is empty/missing: SRCFG00014: Property quarkus.banner.enabled not found
Okt. 06, 2020 10:46:53 NACHM. io.quarkus.application
ERROR: Failed to start application (with profile test)
io.quarkus.runtime.configuration.ConfigurationException: One or more configuration errors has prevented the application from starting. The errors are:
Configuration key "quarkus.http.port" is required, but its value is empty/missing: SRCFG00014: Property quarkus.http.port not found
Configuration key "quarkus.banner.enabled" is required, but its value is empty/missing: SRCFG00014: Property quarkus.banner.enabled not found

[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 3.666 s <<< FAILURE! - in org.acme.getting.started.GreetingResourceTest
[ERROR] org.acme.getting.started.GreetingResourceTest.testHelloEndpoint  Time elapsed: 0.005 s  <<< ERROR!
java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
Caused by: java.lang.RuntimeException: Failed to start quarkus
Caused by: io.quarkus.runtime.configuration.ConfigurationException:
One or more configuration errors has prevented the application from starting. The errors are:
Configuration key "quarkus.http.port" is required, but its value is empty/missing: SRCFG00014: Property quarkus.http.port not found
Configuration key "quarkus.banner.enabled" is required, but its value is empty/missing: SRCFG00014: Property quarkus.banner.enabled not found

The test passes when I add properties without any profile prefix:

quarkus.banner.enabled=true
quarkus.http.port=8080
%foo.quarkus.banner.enabled=false
%bar.quarkus.banner.enabled=true
%bar.quarkus.http.port=12345

Btw, I only have one application.properties in main, but none in test.

@radcortez
Copy link
Member Author

Let me have a look.

@famod
Copy link

famod commented Oct 7, 2020

Might be something Quarkus specific after all.

@radcortez
Copy link
Member Author

Might be something Quarkus specific after all.

Yes, I'm suspecting that.

@radcortez
Copy link
Member Author

Ok, I've made a small fix that should resolve that issue.

I've also reversed the order of the profiles lookup, meaning that profiles defined later in the string will have higher priority.

@famod
Copy link

famod commented Oct 8, 2020

The test in getting-started of https://github.com/famod/quarkus-quickstarts/tree/multiple-profiles is now working! 🎉

But shouldn't the following execution display the banner?

java -Dquarkus.profile=foo,bar -jar target/getting-started-1.0-SNAPSHOT-runner.jar

Given:

%foo.quarkus.banner.enabled=false
%bar.quarkus.banner.enabled=true
%bar.quarkus.http.port=12345

?

@radcortez
Copy link
Member Author

But shouldn't the following execution display the banner?

Yes, I've messed up somewhere :)

Should be fixed now.

@famod
Copy link

famod commented Oct 13, 2020

Should be fixed now.

Confirmed!

@radcortez
Copy link
Member Author

Great! Merging this then :)

@radcortez
Copy link
Member Author

Thank you for all your help :)

@radcortez radcortez merged commit d86322e into smallrye:master Oct 13, 2020
@radcortez radcortez deleted the multiple-profiles branch November 25, 2020 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow activation of multiple configuration profiles
3 participants